const int maxsize=100;
const int N=10;
struct element
{     int weight;
      int lch, rch, parent;
};
template<class T>
 struct  codetype
{
	char bits[N];
	int start;
	T ch;
};
template<class T>
class hftree
{
	private:
		element  hf[maxsize];
		codetype<T> code[maxsize];
	public:
		   hftree(int n);
	void   select(int &i1, int &i2,int k);
	void   hfcode(int n);
	void   print(int n);
};
